<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>libspotify: User handling</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">libspotify
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.0 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">User handling</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:ga3a5dbf9aee629d8a9b43dfb24881a9b4"><td class="memItemLeft" align="right" valign="top">typedef enum <a class="el" href="group__user.html#ga6af84143c0622b6fc5539bb1ae111e5b">sp_relation_type</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__user.html#ga3a5dbf9aee629d8a9b43dfb24881a9b4">sp_relation_type</a></td></tr>
<tr><td colspan="2"><h2><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:ga6af84143c0622b6fc5539bb1ae111e5b"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__user.html#ga6af84143c0622b6fc5539bb1ae111e5b">sp_relation_type</a> { <br/>
&#160;&#160;<a class="el" href="group__user.html#gga6af84143c0622b6fc5539bb1ae111e5ba18f24164eef0e687b351c2aa6753e35e">SP_RELATION_TYPE_UNKNOWN</a> =  0, 
<br/>
&#160;&#160;<a class="el" href="group__user.html#gga6af84143c0622b6fc5539bb1ae111e5bad9805f100828a9d3b64c3cc66f2ac5c1">SP_RELATION_TYPE_NONE</a> =  1, 
<br/>
&#160;&#160;<a class="el" href="group__user.html#gga6af84143c0622b6fc5539bb1ae111e5ba06b2f38745c467e7e362c7744cb74205">SP_RELATION_TYPE_UNIDIRECTIONAL</a> =  2, 
<br/>
&#160;&#160;<a class="el" href="group__user.html#gga6af84143c0622b6fc5539bb1ae111e5ba4bfef63cabd016cf1e6b11347a05d389">SP_RELATION_TYPE_BIDIRECTIONAL</a> =  3
<br/>
 }</td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gad9ac5456cd129c31d2c577ba14e88f8c"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__user.html#gad9ac5456cd129c31d2c577ba14e88f8c">sp_user_canonical_name</a> (<a class="el" href="group__types.html#gaed2dbaa1eebd6752f76613daad9158bc">sp_user</a> *user)</td></tr>
<tr class="memitem:ga0052befb81a93bb7106ca863de892610"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__user.html#ga0052befb81a93bb7106ca863de892610">sp_user_display_name</a> (<a class="el" href="group__types.html#gaed2dbaa1eebd6752f76613daad9158bc">sp_user</a> *user)</td></tr>
<tr class="memitem:ga0996fb9814564e4ad39b8a500cb3de21"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__user.html#ga0996fb9814564e4ad39b8a500cb3de21">sp_user_is_loaded</a> (<a class="el" href="group__types.html#gaed2dbaa1eebd6752f76613daad9158bc">sp_user</a> *user)</td></tr>
<tr class="memitem:ga6d9d1de794f142b33f99fb6331fe6f79"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__user.html#ga6d9d1de794f142b33f99fb6331fe6f79">sp_user_add_ref</a> (<a class="el" href="group__types.html#gaed2dbaa1eebd6752f76613daad9158bc">sp_user</a> *user)</td></tr>
<tr class="memitem:ga6db02370fdedf5f6532e5325feea1770"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__user.html#ga6db02370fdedf5f6532e5325feea1770">sp_user_release</a> (<a class="el" href="group__types.html#gaed2dbaa1eebd6752f76613daad9158bc">sp_user</a> *user)</td></tr>
</table>
<hr/><h2>Typedef Documentation</h2>
<a class="anchor" id="ga3a5dbf9aee629d8a9b43dfb24881a9b4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef enum <a class="el" href="group__user.html#ga6af84143c0622b6fc5539bb1ae111e5b">sp_relation_type</a>  <a class="el" href="group__user.html#ga6af84143c0622b6fc5539bb1ae111e5b">sp_relation_type</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>User relation type </p>

</div>
</div>
<hr/><h2>Enumeration Type Documentation</h2>
<a class="anchor" id="ga6af84143c0622b6fc5539bb1ae111e5b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__user.html#ga6af84143c0622b6fc5539bb1ae111e5b">sp_relation_type</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>User relation type </p>
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="gga6af84143c0622b6fc5539bb1ae111e5ba18f24164eef0e687b351c2aa6753e35e"></a>SP_RELATION_TYPE_UNKNOWN</em>&nbsp;</td><td>
<p>Not yet known. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="gga6af84143c0622b6fc5539bb1ae111e5bad9805f100828a9d3b64c3cc66f2ac5c1"></a>SP_RELATION_TYPE_NONE</em>&nbsp;</td><td>
<p>No relation. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="gga6af84143c0622b6fc5539bb1ae111e5ba06b2f38745c467e7e362c7744cb74205"></a>SP_RELATION_TYPE_UNIDIRECTIONAL</em>&nbsp;</td><td>
<p>The currently logged in user is following this uer. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="gga6af84143c0622b6fc5539bb1ae111e5ba4bfef63cabd016cf1e6b11347a05d389"></a>SP_RELATION_TYPE_BIDIRECTIONAL</em>&nbsp;</td><td>
<p>Bidirectional friendship established. </p>
</td></tr>
</table>
</dd>
</dl>

</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="ga6d9d1de794f142b33f99fb6331fe6f79"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="group__user.html#ga6d9d1de794f142b33f99fb6331fe6f79">sp_user_add_ref</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#gaed2dbaa1eebd6752f76613daad9158bc">sp_user</a> *&#160;</td>
          <td class="paramname"><em>user</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Increase the reference count of an user</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">user</td><td>The user object </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gad9ac5456cd129c31d2c577ba14e88f8c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* <a class="el" href="group__user.html#gad9ac5456cd129c31d2c577ba14e88f8c">sp_user_canonical_name</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#gaed2dbaa1eebd6752f76613daad9158bc">sp_user</a> *&#160;</td>
          <td class="paramname"><em>user</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Get a pointer to a string representing the user's canonical username.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">user</td><td>The Spotify user whose canonical username you would like a string representation of</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>A string representing the canonical username. </dd></dl>

</div>
</div>
<a class="anchor" id="ga0052befb81a93bb7106ca863de892610"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* <a class="el" href="group__user.html#ga0052befb81a93bb7106ca863de892610">sp_user_display_name</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#gaed2dbaa1eebd6752f76613daad9158bc">sp_user</a> *&#160;</td>
          <td class="paramname"><em>user</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Get a pointer to a string representing the user's displayable username. If there is no difference between the canonical username and the display name, or if the library does not know about the display name yet, the canonical username will be returned.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">user</td><td>The Spotify user whose displayable username you would like a string representation of</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>A string </dd></dl>

</div>
</div>
<a class="anchor" id="ga0996fb9814564e4ad39b8a500cb3de21"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="group__user.html#ga0996fb9814564e4ad39b8a500cb3de21">sp_user_is_loaded</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#gaed2dbaa1eebd6752f76613daad9158bc">sp_user</a> *&#160;</td>
          <td class="paramname"><em>user</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Get load status for a user object. Before it is loaded, only the user's canonical username is known.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">user</td><td>Spotify user object</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>True if user object is loaded, otherwise false </dd></dl>

</div>
</div>
<a class="anchor" id="ga6db02370fdedf5f6532e5325feea1770"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="group__user.html#ga6db02370fdedf5f6532e5325feea1770">sp_user_release</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#gaed2dbaa1eebd6752f76613daad9158bc">sp_user</a> *&#160;</td>
          <td class="paramname"><em>user</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Decrease the reference count of an user</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">user</td><td>The user object </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
<hr size="1"><address style="text-align: right;"><small>
Generated on Wed Mar 28 2012 18:22:23.<br>
Copyright &copy; 2006&ndash;2012 Spotify Ltd</small></address>
</body>
</html>
